package com.example.app.components


import androidx.compose.foundation.Image
import androidx.compose.runtime.Composable
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.ColorFilter
import androidx.compose.ui.layout.ContentScale
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.tooling.preview.Preview
import com.example.app.R

@Composable
// contentScale伸缩方式
// colorFilter颜色滤镜
fun ImageSample() {
    Image(
        painter = painterResource(id = R.drawable.a),
        contentDescription = null,
        contentScale = ContentScale.Crop
    )
}

@Preview(
    showSystemUi = true
)
@Composable
fun ImageSamplePreview() {
    ImageSample()
}

